<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
	<c:set var="ctx" value="${pageContext.request.contextPath}"/>

    <title>上传文件</title>

    <!-- Bootstrap Core CSS -->
    <link href="${ctx}/style/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="${ctx}/style/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- DataTables CSS -->
    <link href="${ctx}/style/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">

    <!-- DataTables Responsive CSS -->
    <link href="${ctx}/style/bower_components/datatables-responsive/css/dataTables.responsive.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="${ctx}/style/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="${ctx}/style/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <div id="wrapper">

     <%@ include file="../nav.jsp" %>
        

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">上传文件</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            DataTables Advanced Tables
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th>序列号</th>
                                            <th>功能描述</th>
                                            <th>文件选择</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr class="odd gradeX"  >
                                        <form action="${ctx}/file/addNewStock.do" id="refreshStockForm" method="post" enctype="multipart/form-data">
                                        	<td >1</td>
                                            <td title="https://mall.datayes.com/datapreview/106?lang=zh">上传最新股票</td>
                                            <td >
	                                            <input type="file" name="newStock" >
                                        	</td>
                                            <td >
                                            <button type="submit"  id="refreshStock" class="btn btn-primary">上传</button>
                                            </td>
                                        </form>
                                            
                                        </tr>
                                        
                                        
                                        
                                       
                                        
                                    </tbody>
                                </table>
                            </div>
                           
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
           
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="${ctx}/style/bower_components/jquery/dist/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="${ctx}/style/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="${ctx}/style/bower_components/metisMenu/dist/metisMenu.min.js"></script>

    <!-- DataTables JavaScript -->
    <script src="${ctx}/style/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
    <script src="${ctx}/style/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="${ctx}/style/dist/js/sb-admin-2.js"></script>

	<script src="${ctx}/style/js/refresh-index.js"></script>
    <!-- Page-Level Demo Scripts - Tables - Use for reference -->
    <script>
    
    
   /*  $("#refreshStock").click(function(){
     alert("开始上传文件");
     $("#refreshStockForm").submit(function(){
    	 var options  = {      
                 success:function(data)      
                 {    //成功执行的方法  
                      console.log(data); 
                 }      
             }; 
    	 $(this).ajaxSubmit(options);
    	 return false;
     }) */
    
     
     
     
/*    	 $.ajax({
   	        url: "statisticStock.do",
   	        cache: false,
   	        type: "GET",
   	        dataType: "json",
   	        success: function(result){
   	        	//alert("跑批完成");
   	        },
   	        error: function(result){
   	        	//alert("跑批失败");
   	        }
   	    }); */
   });
    
   
    
    
    </script>

</body>

</html>
